package com.haima.domin;

public class Product {
    private String name;
    private double price;
    private double quantity;

    public Product() {
    }

    public Product(String name, double price, int quantity) {
        this.name = name;
        this.price = price;
        this.quantity = quantity;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getQuantity() {
        return quantity;
    }

    public void setQuantity(double quantity) {
        this.quantity = quantity;
    }

    public void getSum() {
        System.out.println("商品名称为:" + name + "商品价格为:" + price + "商品数量为:" + quantity
                + "商品总价格为:" + (price * quantity));
    }
}
